#include<iostream>
#include<cstring>
using namespace std;
const int M = 2e3 + 10, N = 45;
int n;
int f[N][M];
int main()
{
	//memset(f, -1, sizeof(f));
	cin >> n;
	int m = n * (1 + n) / 2;
	//cout << "m==" << m << endl;
	f[0][0] = 1;
	//f[n] = 1;
	for (int i = 1; i <= n; i++) {
		for (int j = 1; j <= m; j++) {
			/*if (f[j - i]) {
				cout << "i==" << i << "  j==" << j << "   f[j]==" << f[j] << endl;
				f[j] += f[j - i];
			}*/
			f[i][j] = f[i - 1][j];
			if (j >= i) {
				//f[j] += f[j - i];
				f[i][j] += f[i - 1][j - i];
			}
		}
	}
	//cout << f[m / 2] << endl;
	//cout << max(f[m / 2], 0) << endl;
	if (m & 1)cout << 0 << endl;
    else cout << f[n][m / 2] << endl;
	return 0;
}